import request from '@/utils/request'

export function pageList(queryParams) {
  return request({
    url: 'todo/pageList',
    method: 'get',
    params: queryParams
  })
}

export function save(data) {
  return request({
    url: 'todo/save',
    method: 'post',
    data
  })
}

export function updateDone(data) {
  let querys = {};
  querys.doneFlag = 1;
  querys.id = data.id;
  return request({
    url: "todo/update",
    method: 'post',
    data: querys
  })
}

export function updateContent(data) {
  let querys = {};
  querys.name = data.name;
  querys.id = data.id;
  return request({
    url: "todo/update",
    method: 'post',
    data: querys
  })
}

export function updateSorts(data) {
  return request({
    url: `todo/updateSorts`,
    method: 'post',
    data
  })
}

export function doneList() {
  return request({
    url: `todo/doneList`,
    method: 'get'
  })
}

export function doingList() {
  return request({
    url: "todo/doingList",
    method: 'get'
  })
}


